package atag.gui;
/***
 * * PROJECT
 * *    ATaG
 * *
 * *
 * *   ATaG (Abstract Task Graph) - Data-driven Macroprogramming for
 * *                                Sensor Networks
 * *
 * *   This program is free software; you can redistribute it and/or
 * *   modify it under the terms of the GNU General Public License
 * *   as published by the Free Software Foundation; either version 2
 * *   of the License, or (at your option) any later version.
 * *
 * *   This program is distributed in the hope that it will be useful,
 * *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 * *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * *   GNU General Public License for more details.
 * *
 * *   You should have received a copy of the GNU General Public License
 * *   along with this program; if not, you may find a copy at the FSF web
 * *   site at 'www.gnu.org' or 'www.fsf.org', or you may write to the
 * *   Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * *   Boston, MA  02111-1307, USA
 ***/

import javax.swing.*;
import java.awt.*;
import java.util.*;
import java.io.*;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.Vector;
import java.awt.image.*;
import javax.imageio.*;
import java.awt.geom.*;		// For Ellipse2D, etc.

import atag.runtime.ln.nodeAttributesForGUI.NodeAttribute;
import atag.runtime.ln.nodeAttributesForGUI.SetAttribute;

public class NodeInGraphInfo {

        public NodeInGraphInfo (int id, int x, int y) {
            this.myId = id;
            this.Xcoord = x;
            this.Ycoord = y;
        }
	public int myId;

	public int Xcoord;
        public int Ycoord;

        public Graphics2D myGraphics;
        public int getGraphNodeID () {
            return this.myId;

        }
        public boolean contains(int x, int y) {
            int Xcenter = Xcoord;//+Constants.NODE_IMAGE_WIDTH/2;
            int Ycenter = Ycoord;//+Constants.NODE_IMAGE_HEIGHT/2;
            if ((Math.abs(x-Xcenter) <= Constants.NODE_IMAGE_WIDTH/2) && (Math.abs(y-Ycenter) <= Constants.NODE_IMAGE_HEIGHT/2)) {
                return true;
            }
            else
                return false;
        }
}
